<template lang="pug">
    div.navigation
        div(v-for="(item,index) in list" :key="index").nav
            div(v-for="cell in item.classify").nav-item
                img(:src="cell.url")
                div {{cell.name}}
</template>

<script>
export default {
  name: "navigation",
  data() {
    return {
      list: [
        {
          classify: [
            {
              name: "超市",
              url: require("../../../assets/icon/home/navigation/supermarket.png")
            },
            {
              name: "超市",
              url: require("../../../assets/icon/home/navigation/shopping.png")
            },
            {
              name: "服装",
              url: require("../../../assets/icon/home/navigation/clothing.png")
            },
            {
              name: "生鲜",
              url: require("../../../assets/icon/home/navigation/fresh.png")
            },
            {
              name: "配送",
              url: require("../../../assets/icon/home/navigation/get.png")
            }
          ]
        },
        {
          classify: [
            {
              name: "充值中心",
              url: require("../../../assets/icon/home/navigation/charge_telephone.png")
            },
            {
              name: "领京豆",
              url: require("../../../assets/icon/home/navigation/get.png")
            },
            {
              name: "领券",
              url: require("../../../assets/icon/home/navigation/discount_coupon.png")
            },
            {
              name: "惠赚钱",
              url: require("../../../assets/icon/home/navigation/wallet.png")
            },
            {
              name: "全部",
              url: require("../../../assets/icon/home/navigation/all.png")
            }
          ]
        }
      ]
    };
  }
};
</script>

<style scoped lang="stylus">
    .navigation
        margin-top 0.2rem
        .nav
            display: flex
            justify-content space-around
            .nav-item
                display inline-block
                width 1.3rem
                margin-top 0.2rem
                img
                    width 100%
</style>
